package com.ruoyi.project.shortUrl.config.enums;

import java.util.Arrays;

public enum ShortUrlOpenWay {
	FRAME("frame框架打开(链接不变)"), FORWARD("转发(链接变了)");
	
	private String name;
	
	private ShortUrlOpenWay(String name) {
		this.setName(name);
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public static ShortUrlOpenWay getEnum(String value) {
		return Arrays.asList(ShortUrlOpenWay.values()).stream()
        .filter(exT -> exT.toString().equals(value))
        .findFirst().orElse(ShortUrlOpenWay.FORWARD);
	}
}
